package com.dacool.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DacoolProduct implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8195748887851599975L;

	private String name;
	private String id;
	private String description;
	private double price;
	private int availableCount;
	private Date time;
	private ArrayList<ProductSpec> productSpecs = new ArrayList<DacoolProduct.ProductSpec>();
	private String iconUrl;
	private List<String> imageUrls;
	private String thumbnailImageUrl;
	private String bigImageUrl;

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	public List<String> getImageUrls() {
		return imageUrls;
	}

	public void setImageUrls(List<String> imageUrls) {
		this.imageUrls = imageUrls;
	}

	public String getName() {
		return name;
	}

	public void setProductSpecs(ArrayList<ProductSpec> productSpecs) {
		this.productSpecs = productSpecs;
	}

	public ArrayList<ProductSpec> getProductSpecs() {
		return productSpecs;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getPrice() {
		return ((int) (price * 100)) / 100.0;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getAvailableCount() {
		return availableCount;
	}

	public void setAvailableCount(int availableCount) {
		this.availableCount = availableCount;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Date getTime() {
		return time;
	}

	/**
	 * @return the thumbnailImageUrl
	 */
	public String getThumbnailImageUrl() {
		return thumbnailImageUrl;
	}

	/**
	 * @param thumbnailImageUrl
	 *            the thumbnailImageUrl to set
	 */
	public void setThumbnailImageUrl(String thumbnailImageUrl) {
		this.thumbnailImageUrl = thumbnailImageUrl;
	}

	/**
	 * @return the bigImageUrl
	 */
	public String getBigImageUrl() {
		return bigImageUrl;
	}

	/**
	 * @param bigImageUrl
	 *            the bigImageUrl to set
	 */
	public void setBigImageUrl(String bigImageUrl) {
		this.bigImageUrl = bigImageUrl;
	}

	public static class ProductSpec implements Serializable {
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		public String name;
		public String id;
		public float price;
	}
}
